package com.xyhy.core.file.oss.aliyun;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.Setter;

import java.util.List;
import java.util.stream.Collectors;

/**
 * @author robert
 * @since 2024-12-05
 */
@Getter
@Setter
@ApiModel("文件：oss：图片批量上传：请求业务类")
public class ImageBatchUploadReqBO {
  @NotNull
  @ApiModelProperty("文件类型，如 png, jpg, mp4等后缀名")
  private List<String> fileTypes;


  public List<ImageUploadReqBO> getRequestBOs() {
    return fileTypes.stream().map(x -> new ImageUploadReqBO(x)).collect(Collectors.toList());
  }
}
